home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / CONTRSRC.ZIP / SRC / GOPI / VIDEO1.INC < prev    next >
Encoding:
Text File  |  1994-10-29  |  2.3 KB  |  110 lines

  1. ;*****************************************************************************
  2. openvideo macro
  3.       mov   ax,0013h
  4.       int   10h
  5.       mov   dx,3ceh
  6.       mov   al,5
  7.       out   dx,al
  8.       inc   dx
  9.       in    al,dx
  10.       and   al,11101111b
  11.       out   dx,al
  12.       dec   dx
  13.       mov   al,6
  14.       out   dx,al
  15.       inc   dx
  16.       in    al,dx
  17.       and   al,11111101b
  18.       out   dx,al
  19.       mov   dx,3c4h
  20.       mov   al,4
  21.       out   dx,al
  22.       inc   dx
  23.       in    al,dx
  24.       and   al,11110111b
  25.       or    al,4
  26.       out   dx,al
  27.       mov   ax,0A000h
  28.       mov   vio_seg,ax
  29.       mov   es,ax
  30.       xor   di,di
  31.       mov   ax,di
  32.       mov   cx,8000h
  33.       rep   stosw
  34.       mov   dx,3d4h
  35.       mov   al,14h
  36.       out   dx,al
  37.       inc   dx
  38.       in    al,dx
  39.       and   al,10111111b
  40.       out   dx,al
  41.       dec   dx
  42.       mov   al,17h
  43.       out   dx,al
  44.       inc   dx
  45.       in    al,dx
  46.       or    al,01000000b
  47.       out   dx,al
  48. endm
  49. ;*****************************************************************************
  50. LOAD_PAL MACRO PAL
  51.         local bcl
  52.     mov     dx, 3C8h
  53.     mov     ax, 0
  54.     xor     si, si
  55. bcl:    out     dx, al
  56.     inc     dl
  57.     push    ax
  58.     mov     al, byte ptr &PAL&[si]
  59.     out     dx, al
  60.     mov     al, byte ptr &PAL&[si+1]
  61.     out     dx, al
  62.     mov     al, byte ptr &PAL&[si+2]
  63.     out     dx, al
  64.     pop     ax
  65.     dec     dl
  66.     add     si, 3
  67.     inc     ax
  68.     cmp     ax, 256
  69.     jl      bcl
  70. ENDM
  71. ;*****************************************************************************
  72. FADE_PAL MACRO PAL
  73.     mov     dx, 3C8h
  74.     mov     ax, 0
  75.     xor     si, si
  76. bcl:    out     dx, al
  77.     inc     dl
  78.     push    ax
  79.     mov     al, byte ptr &PAL&[si]
  80.     out     dx, al
  81.     mov     al, byte ptr &PAL&[si+1]
  82.     out     dx, al
  83.     mov     al, byte ptr &PAL&[si+2]
  84.     out     dx, al
  85.     pop     ax
  86.     dec     dl
  87.     add     si, 3
  88.     inc     ax
  89.     cmp     ax, 256
  90.     jl      bcl
  91. ENDM
  92. ;*****************************************************************************
  93. CloseVideo MACRO
  94.         mov     ax, 3h
  95.         int     10h
  96. ENDM
  97. ;*****************************************************************************
  98. WAITVRT MACRO
  99. local vrt, novrt    
  100.     mov     dx,3dah
  101. VRT:
  102.     in      al,dx
  103.     test    al,8
  104.     jnz     VRT         ; attend que le 'vertical retrace' dĂ©marre 
  105. NOVRT:
  106.     in      al,dx
  107.     test    al,8
  108.     jz      NOVRT       ; attend que le 'vertical retrace' s'arrĂȘte
  109. ENDM
  110. ;*****************************************************************************